<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>易优名品</title>
    <link rel="stylesheet" href="__LayUI__/css/layui.css">
    <link rel="stylesheet" href="__Admin__/css/admin.scss">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    {include file="layout/head" /}

    {include file="layout/sidebar" /}

    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div id="mainContain">
            <form method="POST" class="layui-form layui-col-xs8" autocomplete="off">
                <input type="hidden" value="{$res.id}">
                <div class="layui-form-item">
                    <label class="layui-form-label">栏目名</label>
                    <div class="layui-input-block">
                      <input type="text" name="catename" required=""  placeholder="请输入栏目名" autocomplete="off" class="layui-input" value={$res.catename}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">父栏目</label>
                    <div class="layui-input-block">
                        <select name="pid"   lay-verify="">
                           <option value="">请选择类型</option>
                           <option value="0" {if condition="$res['pid'] eq 0"}selected{/if}>顶级栏目</option>   
                          {volist name="cates" id="vo"}
                               <option value="{$vo.id}" {if condition="$vo['id'] eq $res['pid']"}selected{/if}><?php echo str_repeat('---',$vo['level'])?>{$vo.catename}</option>  
                          {/volist}
                        </select>   
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">栏目描述</label>
                    <div class="layui-input-block">
                        <input type="text" name="desc"   placeholder="请输入栏目描述" autocomplete="off" class="layui-input" value={$res.desc}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">栏目关键词</label>
                    <div class="layui-input-block">
                        <input type="text" name="keywords"   placeholder="请输入栏目关键词" autocomplete="off" class="layui-input" value={$res.keywords}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">类型</label>
                    <div class="layui-input-block">
                        <input type="radio" data-url="{$res['type']}" name="type" value="1" title="菜单列表" {if condition="$res['type'] eq 1"} checked {else/} {/if} />
                        <input type="radio" data-url="{$res['type']}" name="type" value="2" title="单页" {if condition="$res['type'] eq 2"}  checked {else/}  {/if} />
                        <input type="radio" data-url="{$res['type']}" name="type" value="3" title="图片列表" {if condition="$res['type'] eq 3"}  checked {else/}  {/if} />
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">栏目内容</label>
                    <div class="layui-input-block">
                          <textarea id='editor' name="content" >{$res.content}</textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                      <button class="layui-btn" >立即提交</button>
                      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>

    {include file="layout/footer" /}

</div>
<script src="__LayUI__/layui.js"></script>
<!-- 配置文件 -->
<script type="text/javascript" src="__Ueditor__/utf8-php/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__Ueditor__/utf8-php/ueditor.all.js"></script>
<script src="__Admin__/js/jquery-3.3.1.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('editor',{
        initialFrameWidth :900,
        zIndex:100,
    });
    $('.edui-toolbar').on('click',function () {
        $("#edui_fixedlayer").css('z-index','999');
    })

</script>
<script>
    layui.use(['element','form'], function(){
             var form = layui.form;
});

</script>
</body>
</html>